#ifndef __IMX6Q_MMPF0100_H
#define __IMX6Q_MMPF0100_H


/*
	@mmpf0100_config:
		mmpf0100 configuration
	@busnum:
		i2c bus number
	@chip:
		i2c addr
*/
typedef struct mmpf0100_config {
	unsigned int  busnum;
	unsigned char chip;
} mmpf0100_config;

/*
	@mmpf0100:
		mmpf0100
*/
typedef struct mmpf0100 {
	struct mmpf0100_config config;
} mmpf0100;

/*
	@mmpf0100_alloc:
		alloc a mmpf0100
	@config
		mmpf0100 configuration
			[NULL]: use default
				  : use config
	@ret:
		return
			[NULL]: failed
					success
*/
extern mmpf0100* mmpf0100_alloc(mmpf0100_config *config);

/*
	@mmpf0100_init:
		init mmpf0100
	@ret:
		return
			[0]	success
				failed
*/
extern int mmpf0100_init(mmpf0100 *obj);

/*
	@mmpf0100_set_swmode:
		set swx mode
	@swx:
		SWX
			[0]: sw1ab
			[1]: sw1c
			[2]: sw2
			[3]: sw3a
			[4]: sw3b
			[5]: sw4
	@mode:
		sw mode noraml_standby
			[0x0]: off_off
			[0xc]: aps_pfm	
	@ret:
		return
			[0]: success
*/
extern int mmpf0100_set_swmode(mmpf0100 *obj, unsigned char swx, unsigned char mode);

/*
	@mmpf0100_write
		mmpf0100 write register
	@val:
		register value
	@addr:
		register address
	@ret:
		return
*/
extern void mmpf0100_write(mmpf0100 *obj,  unsigned char val, unsigned char addr);

/*
	@mmpf0100_read
		mmpf0100 read register
	@addr:
		register address
	@ret:
		return register value
*/
extern unsigned char mmpf0100_read(mmpf0100 *obj, unsigned char addr);

#endif
